package io.xccit.clients;

import io.xccit.pojo.param.ProductHotsParam;
import io.xccit.result.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author CH_ywx
 * @date 2023-09-10
 * @description 类别远程调用接口
 */
@FeignClient("category-service")
public interface ICategoryClients {

    /**
     * 获取热门类别商品--->首页7条
     * @param categoryName
     * @return
     */
    @GetMapping("/category/promo/{categoryName}")
    AjaxResult selectByName(@PathVariable String categoryName);

    /**
     * 根据首页热门类别获取商品Sku
     * @param param
     * @return
     */
    @PostMapping("/category/hots")
    AjaxResult hotsCategory(@RequestBody ProductHotsParam param);

    @GetMapping("/category/list")
    AjaxResult list();

}
